import type { DirectiveBinding, Directive } from "vue";
function autoFocus(el: any, binding: DirectiveBinding) {
  el.querySelector("input").focus();
}

const directive: Directive = {
  mounted(el: HTMLElement, binding: DirectiveBinding) {
    autoFocus(el, binding);
  },
  updated(el: HTMLElement, binding: DirectiveBinding) {
    autoFocus(el, binding);
  }
};

export default directive;
